﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using YamlDotNet.Serialization;
using YamlDotNet.Serialization.NamingConventions;

public class MeshRendererDoc : DocPrimitive
{
	[YamlMember(Alias = "MeshRenderer", ApplyNamingConventions = false)]
	public MeshRendererObj mro { get; set; }
}

public class MeshRendererMaterial
{
    public Dictionary<string, string> material{ get; set; }
}

public class StaticBatchInfo
{
    public int firstSubMesh { get; set; }
    public int subMeshCount { get; set; }
}

public class MeshRendererObj
{
    [YamlMember(Alias = "m_ObjectHideFlags", ApplyNamingConventions = false)]
    public int objectHideFlags { get; set; }

    [YamlMember(Alias = "m_PrefabParentObject", ApplyNamingConventions = false)]
    public Dictionary<string, string> prefabParent { get; set; }

    [YamlMember(Alias = "m_PrefabInternal", ApplyNamingConventions = false)]
    public Dictionary<string, int> prefabInternal { get; set; }

    [YamlMember(Alias = "m_GameObject", ApplyNamingConventions = false)]
    public Dictionary<string, uint> gameObject { get; set; }

    [YamlMember(Alias = "m_Enabled", ApplyNamingConventions = false)]
    public int enabled { get; set; }

    [YamlMember(Alias = "m_CastShadows", ApplyNamingConventions = false)]
    public int castShadow { get; set; }

    [YamlMember(Alias = "m_ReceiveShadows", ApplyNamingConventions = false)]
    public int receiveShadow { get; set; }

    [YamlMember(Alias = "m_MotionVectors", ApplyNamingConventions = false)]
    public int motionVectors { get; set; }

    [YamlMember(Alias = "m_LightProbeUsage", ApplyNamingConventions = false)]
    public int lightProbeUsage { get; set; }

    [YamlMember(Alias = "m_ReflectionProbeUsage", ApplyNamingConventions = false)]
    public int reflectionProbeUsage { get; set; }

    [YamlMember(Alias = "m_Materials", ApplyNamingConventions = false)]
    public List<MeshRendererMaterial> mrm { get; set; }

    [YamlMember(Alias = "m_StaticBatchInfo", ApplyNamingConventions = false)]
    public StaticBatchInfo batchInfo { get; set; }

    [YamlMember(Alias = "m_StaticBatchRoot", ApplyNamingConventions = false)]
    public Dictionary<string, int> staticBatchRoot { get; set; }

    [YamlMember(Alias = "m_ProbeAnchor", ApplyNamingConventions = false)]
    public Dictionary<string, int> probeAnchor { get; set; }

    [YamlMember(Alias = "m_LightProbeVolumeOverride", ApplyNamingConventions = false)]
    public Dictionary<string, int> lightProbeVolumeOverride { get; set; }

    [YamlMember(Alias = "m_ScaleInLightmap", ApplyNamingConventions = false)]
    public int scaleInLightmap { get; set; }

    [YamlMember(Alias = "m_PreserveUVs", ApplyNamingConventions = false)]
    public int preserveUV { get; set; }

    [YamlMember(Alias = "m_IgnoreNormalsForChartDetection", ApplyNamingConventions = false)]
    public int ignoreNormals { get; set;  }

    [YamlMember(Alias = "m_ImportantGI", ApplyNamingConventions = false)]
    public int importantGI { get; set; }

    [YamlMember(Alias = "m_SelectedEditorRenderState", ApplyNamingConventions = false)]
    public int selectedEditorRenderState { get; set; }

    [YamlMember(Alias = "m_MinimumChartSize", ApplyNamingConventions = false)]
    public int chartSizeMin { get; set; }

    [YamlMember(Alias = "m_AutoUVMaxDistance", ApplyNamingConventions = false)]
    public float autoUVMaxDistance { get; set; }

    [YamlMember(Alias = "m_AutoUVMaxAngle", ApplyNamingConventions = false)]
    public float autoUVMaxAngle { get; set; }

    [YamlMember(Alias = "m_LightmapParameters", ApplyNamingConventions = false)]
    public Dictionary<string, int> lightmapParameters { get; set; }

    [YamlMember(Alias = "m_SortingLayerID", ApplyNamingConventions = false)]
    public int sortingLayerID { get; set; }

    [YamlMember(Alias = "m_SortingLayer", ApplyNamingConventions = false)]
    public int sortingLayer { get; set; }

    [YamlMember(Alias = "m_SortingOrder", ApplyNamingConventions = false)]
    public int sortingOrder { get; set; }

}
